package com.pie4cloud.pie.job.biz.mapper;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.pie4cloud.pie.job.api.entity.GatherEntity;
import com.pie4cloud.pie.job.api.vo.GatherInfoVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 *
 */
@Mapper
public interface GatherMapper extends BaseMapper<GatherEntity> {

	@Select("select main.task_name,main.id,main.job_cron,main.job_desc,main.retry_interval,main.trigger_status,apply.apply_description,gather.gather_name,decode1.decode_name from t_data_job_info main,t_data_job_gather_info child left join t_apply_info apply on child.apply_info_id left join t_config_gather " +
			" gather on child.gather_id=gather.gather_id left join t_config_decode decode1 on child.decode_id = decode1.decode_id where main.id=child.id")
	IPage<GatherInfoVo> selectGatherPage(@Param(Constants.WRAPPER) QueryWrapper<GatherInfoVo> queryWrapper, IPage<GatherInfoVo> ipage);
}

